{if $GLOBALS.is_ajax || $smarty.get.ajax_submit}

	{if $value.file_name ne null}
	<div id="profile_logo_{$id}">
		<img src="{$value.file_url}" alt="" border="0" />
		<br/><br/>
		<a class="delete_profile_logo"
		   field_id="{$id}"
		   file_id="{$value.file_id}"
		   user_sid="{$user_info.sid}"
		   href="{$GLOBALS.user_site_url}/users/delete-uploaded-file/?field_id={$id}">[[Remove]]</a>
		<br/><br/>
	</div>
	{/if}
	<input type="file"
		   id="autoloadFileSelect_{$id}"
		   field_id="{$id}"
		   field_action="upload_profile_logo"
		   field_target="logo_field_content_{$id}"
		   name="{if $complexField}{$complexField}[{$id}][{$complexStep}]{else}{$id}{/if}"
		   class="autouploadField {if $complexField}complexField{/if}"
		   {if $value.file_name ne null}style="display:none;"{/if} />

{else}


<div id="logo_field_content_{$id}">

	{if $value.file_name ne null}
	<div id="profile_logo_{$id}">
		<img src="{$value.file_url}" alt="" border="0" />
		<br/><br/>
		<a class="delete_profile_logo"
		   field_id="{$id}"
		   file_id="{$value.file_id}"
		   user_sid="{$user_info.sid}"
		   href="{$GLOBALS.user_site_url}/users/delete-uploaded-file/?field_id={$id}">[[Remove]]</a>
		<br/><br/>
	</div>
	{/if}
	<input type="file"
		   id="autoloadFileSelect_{$id}"
		   field_id="{$id}"
		   field_action="upload_profile_logo"
		   field_target="logo_field_content_{$id}"
		   name="{if $complexField}{$complexField}[{$id}][{$complexStep}]{else}{$id}{/if}"
		   class="autouploadField {if $complexField}complexField{/if}"
		   {if $value.file_name ne null}style="display:none;"{/if} />


</div>


	<script>
		getProfileLogoData('{$id}', '{$form_token}', '{$user_info.sid}');
	</script>

{/if}